package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className FactorConditionTypeEnum
 * @description 因素条件选择枚举
 * @create 2022-05-27 14:43
 **/
public enum FactorConditionTypeEnum {

	//因素条件选择 and 并且 or 或者
	AND("and", "并且"),
	OR("or", "或者");

	private final String type;

	private final String name;

	FactorConditionTypeEnum(String type, String name) {
		this.type = type;
		this.name = name;
	}

	public static FactorConditionTypeEnum getEnumByKey(String type) {
		for (FactorConditionTypeEnum temp : FactorConditionTypeEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp;
			}
		}
		return null;
	}

	public String getType() {
		return type;
	}

	public String getName() {
		return name;
	}
}
